<?PHP
	echo "Recreate table";
	$userName = "root";
	$password = "group05";
	$database = "test";
	$server = "cg3002-05-z.comp.nus.edu.sg";
	$dbHandle = mysql_connect($server, $userName, $password);
	$dbFound = mysql_select_db($database, $dbHandle);
	
	if ($dbFound) {
		$query = "drop table admin;";
		$result = mysql_query($query);
		$query = "Create table admin
					(
						adminID int NOT NULL,
						password varchar(15) NOT NULL,
						shopID int NOT NULL,
						name varchar(63) NOT NULL,
						isHQAdm boolean NOT NULL,
						PRIMARY KEY (adminID),
						FOREIGN KEY (shopID) REFERENCES shop (shopID) ON DELETE CASCADE
					);";
		$result = mysql_query($query) or die(mysql_error());
	}
	else echo "Fail to create admin";
?>